package com.yvchen.yc_system.module.wx.controller;

import com.yvchen.yc_system.module.wx.server.SendMessageServer;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.UUID;

@RestController
@RequestMapping("/wx")
public class WxController {
    @Resource
    SendMessageServer sendMessageServer;
    /**
     * 模板id
     */
    private String templateId = "FdBFmRrDfMGh_MtEZu0VQlhSUCQTQYKGhZwtnQShcMU";
    /**
     * appid
     */
    private String APPID = "wxd48d2e1700f4cbe7";
    @GetMapping("/send")
    public void send(){
//        String str = sendMessageServer.push("oaOYh6_aE2k2NzRViH8k9NyCOedI");
//        System.out.println("返回值"+str);
//        String str = sendMessageServer.sendWxMessage("oaOYh6_aE2k2NzRViH8k9NyCOedI");
        String str = sendMessageServer.getToken(APPID,templateId);

        System.out.println("返回值"+str);

    }

}
